<?php
/**
 * Joomla! 1.5 component wbdatabase
 *
 * @version $Id: wbdatabase.php 2009-04-09 16:20:44 svn $
 * @author woomla
 * @package Joomla
 * @subpackage wbdatabase
 * @license GNU/GPL
 *
 * A personal database with some fields to remember logins and pin codes.
 *
 * This component file was created using the Joomla Component Creator by Not Web Design
 * http://www.notwebdesign.com/joomla_component_creator/
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

/*
 * Define constants for all pages
 */
define( 'COM_WBDATABASE_DIR', 'images'.DS.'wbdatabase'.DS );
define( 'COM_WBDATABASE_BASE', JPATH_ROOT.DS.COM_WBDATABASE_DIR );
define( 'COM_WBDATABASE_BASEURL', JURI::root().str_replace( DS, '/', COM_WBDATABASE_DIR ));

// Require the base controller
require_once JPATH_COMPONENT.DS.'controller.php';

// Require the base controller
require_once JPATH_COMPONENT.DS.'helpers'.DS.'helper.php';


// Require specific controller if requested
if($controller = JRequest::getWord('controller')) {
	$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
	if (file_exists($path)) {
		require_once $path;
	} else {
		$controller = '';
	}
}

// Create the controller
$classname	= 'WbdatabasesController'.$controller;
$controller	= new $classname( );

// Perform the Request task
$controller->execute( JRequest::getCmd('task'));
$controller->redirect();
?>